# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=qreator
pkgver=20.02.1
pkgrel=4
pkgdesc='Graphical utility for creating QR codes'
arch=('any')
url='https://gitlab.com/qreator-dev/qreator'
license=('GPL3')
depends=('geoclue' 'libchamplain' 'libnm' 'python-pillow' 'python-cairo' 'python-gobject'
         'python-qrencode' 'python-requests' 'python-vobject' 'python-pyxdg')
makedepends=('python-distutils-extra' 'git')
_commit=56c4926413ef5202bfbfbfedecdb3ed4b9ae91a7  # master
source=("git+https://gitlab.com/qreator-dev/qreator.git#commit=$_commit"
        'python3.9.patch'
        'qreator.appdata.xml')
sha256sums=('SKIP'
            '0e12e98e58c497d3b7dc44da1b15eeb0a7a2dc1e75483b7ec1870c59b85ccf34'
            '55c0de408952322217f6f39c52ea9940c1e5f0a14f0fa14687644ad2c4740549')

prepare() {
  cd $pkgname
  patch -Np1 -i ../python3.9.patch
}

build() {
  cd $pkgname
  python setup.py build
}

package() {
  cd $pkgname
  python setup.py install --root "$pkgdir" --optimize=1
  install -Dm644 ../$pkgname.appdata.xml "$pkgdir/usr/share/metainfo/$pkgname.appdata.xml"
}
